home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / remdevice.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  80 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remdevice.c,v 1.5 1996/10/24 15:50:55 aros Exp $
  4.     $Log: remdevice.c,v $
  5.     Revision 1.5  1996/10/24 15:50:55  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:56:06  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:16  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/devices.h>
  20. #include <exec/execbase.h>
  21. #include <aros/libcall.h>
  22. #include <dos/dos.h>
  23.  
  24. /*****************************************************************************
  25.  
  26.     NAME */
  27.     #include <clib/exec_protos.h>
  28.  
  29.     AROS_LH1(void, RemDevice,
  30.  
  31. /*  SYNOPSIS */
  32.     AROS_LHA(struct Device *, device,A1),
  33.  
  34. /*  LOCATION */
  35.     struct ExecBase *, SysBase, 73, Exec)
  36.  
  37. /*  FUNCTION
  38.     Calls the given device's expunge vector, thus trying to delete it.
  39.     The device may refuse to do so and still be open after this call.
  40.  
  41.     INPUTS
  42.     device - Pointer to the device structure.
  43.  
  44.     RESULT
  45.  
  46.     NOTES
  47.  
  48.     EXAMPLE
  49.  
  50.     BUGS
  51.  
  52.     SEE ALSO
  53.     AddDevice(), OpenDevice(), CloseDevice().
  54.  
  55.     INTERNALS
  56.  
  57.     HISTORY
  58.  
  59. ******************************************************************************/
  60. {
  61.     AROS_LIBFUNC_INIT
  62.  
  63.     /* Arbitrate for the device list */
  64.     Forbid();
  65.  
  66.     /* Call expunge vector */
  67.     (void)AROS_LVO_CALL0(BPTR,struct Device *,device,3,);
  68.     /*
  69.     Normally you'd expect the device to be expunged if this returns
  70.     non-zero, but this is only exec which doesn't know anything about
  71.     seglists - therefore dos.library has to SetFunction() into this
  72.     vector for the additional functionality.
  73.     */
  74.  
  75.     /* All done. */
  76.     Permit();
  77.     AROS_LIBFUNC_EXIT
  78. } /* RemDevice */
  79.  
  80.